package com.hs.sfzy.util;

/**
 * @ClassName ResultCode
 * @Description TODO
 * @Author QinKunPeng
 * @Date 2024年10月21日 11:49
 * @Version 1.0
 */
public enum ResultCode {
    OK(200, "成功"),
    USERNAME_EXISTS(401, "用户名已存在"),
    USERNAME_ERROR(402, "用户名或密码错误"),
    NO_USER(403, "用户不存在"),
    NOT_LOGIN(404, "用户未登录"),
    NO_PERMISSION(405, "权限不足，禁止访问"),
    ERROR(500, "失败");
    private int code;
    private String msg;

    private ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
